/**
 * Created by 白雨浓 on 2018/12/5 12:01.
 *
 * 字符串格式化，主要用在RESTful api
 */

export default {
  install(Vue) {
    Vue.prototype.$format = (str, ...params) => {
      for (const param of params) {
        str = str.replace('{}', param);
      }
      return str;
    };
  }
}